+2008-05-21 Jan Heller <jheller@svn.gnome.org>
+
+ * babl/babl-internal.h:
+ * babl/base/type-u16.c:
+ * babl/base/type-u32.c:
+ * babl/base/type-u8.c:
+ * extensions/CIE-Lab.c:
+ * extensions/gegl-fixups.c:
+ * extensions/gggl-lies.c:
+ * extensions/gggl.c:
+ * extensions/gimp-8bit.c:
+ * extensions/util.h: fallback to floor function when rint function
+ is not available.
+
+ * configure.ac: added check for rint function.
+
2008-05-20 Jan Heller <jheller@svn.gnome.org>
* extensions/gimp-8bit.c (conv_rgbaF_linear_rgb8_linear),
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <math.h>
#include "assert.h"
#undef _BABL_INTERNAL_H
#include "babl.h"
#define _BABL_INTERNAL_H
+#include "config.h"
+
#include "babl-list.h"
#include "babl-hash-table.h"
#include "babl-db.h"
#define random rand
#endif
+/* fallback to floor function when rint is not around */
+#ifndef HAVE_RINT
+# define rint(f) ((long) floor (((double) f) + 0.5))
+#endif
+
+
+
Babl * babl_conversion_find (const void *source,
const void *destination);
double babl_conversion_error (BablConversion *conversion);
#include <assert.h>
#include <math.h>
-#include "babl.h"
-#include "babl-ids.h"
+#include "babl-internal.h"
#include "babl-base.h"
#include <assert.h>
#include <math.h>
-#include "babl.h"
-#include "babl-ids.h"
+#include "babl-internal.h"
#include "babl-base.h"
static inline long
#include <assert.h>
#include <stdint.h>
-#include "babl.h"
-#include "babl-ids.h"
+#include "babl-internal.h"
#include "babl-base.h"
#include <math.h>
dnl ===========================================================================
AC_SEARCH_LIBS([dlopen], [dl])
+AC_SEARCH_LIBS([rint], [m])
AC_REPLACE_FUNCS(gettimeofday)
+AC_CHECK_FUNCS(rint)
#BABL_PATH_SEPARATOR must be defined as a character.
#BABL_DIR_SEPARATOR must be defined as a string.
* <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <math.h>
#include <string.h>
#include "babl.h"
+#include "extensions/util.h"
int init (void);
* TODO: error diffusion,
*/
-#include "config.h"
-
#include "babl.h"
#include "base/util.h"
+#include "extensions/util.h"
#define INLINE inline
* Copyright 2003, 2004, 2005 Øyvind Kolås <pippin@gimp.org>
*/
-#include "config.h"
-
#include <math.h>
#include <string.h>
#include "babl.h"
+#include "extensions/util.h"
#define INLINE inline
* Copyright 2003, 2004, 2005 Øyvind Kolås <pippin@gimp.org>
*/
-#include "config.h"
-
#include <math.h>
#include <string.h>
#include "babl.h"
+#include "extensions/util.h"
#define INLINE inline
* <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdio.h>
#include "babl.h"
#include "base/util.h"
+#include "extensions/util.h"
#define INLINE inline
#include <assert.h>
#include <math.h>
+#include "config.h"
+
+#ifndef HAVE_RINT
+# define rint(f) ((long) floor (((double) f) + 0.5))
+#endif
+
+
#define BABL_PLANAR_SANITY \
{ \
assert(src_bands>0); \